Exchange Online
Master document for managing all things in the Exchange Admin Center and Exchange Online Management via powershell. FYI, windows is case insensitive, meaning you dont need to capitlize anything. Except when calling groups with capitlized names.
Table of Contents
Exchange Admin Center
Powershell Commands
Connecting to Exchange Online Management in Powershell
set-executionpolicy unrestricted -scope processsimport-module exchangeonlinemanagementconnect-exchangeonlineDynamic Distribution Groups
Store dynamic distribution group as a variable to make it easier to call later on. Some commands also require the group to be stored as a variable to run.
$groupname = get-dynamicdistributiongroup "group_name_here"Example of creating a filter and storing as a variable.
$filter = '(Company -eq "Xenter, Inc.") -and (ExchangeUserAccountControl -ne "AccountDisabled") -and (StateOrProvince -eq "CA")'Apply a filter to a dynamic distribution group
set-dynamicdistributiongroup -identity $groupname -recipientfilter $filterCheck if a recipient filter has been properly applied to a dynamic distribution group
get-dynamicdistributiongroup -identity $groupname | format-List Name,RecipientFilterPreview members in a dynamic distribution group using the currently set filter.
get-recipient -recipientpreviewfilter $groupname.RecipientFilter | select AliasForce membership refresh of a dynamic distribution group. You only get a couple forced refreshes in a 24 hour period.
set-dynamicdistributiongroup -identity $groupname -forcemembershiprefreshCheck the SMTP emails in a dynamic distribution group
Get-Recipient -RecipientPreviewFilter ($groupname.RecipientFilter) -OrganizationalUnit ($groupname.RecipientContainer) | ForEach {$_ | select PrimarySmtpAddress}Check users in a dynamic distribution group
Get-DynamicDistributionGroupMember -Identity $groupname | select Alias,Company
Set Calendar Permissions
Add a user to have edit permissions on another users calendar.
Add-MailboxFolderPermission -Identity "USERS_EMAIL_HERE:\Calendar" -User EDITORS_EMAIL_HERE -AccessRights EditorCheck who has permissions on a users calendars.
Get-MailboxFolderPermission -Identity "USERS_EMAIL_HERE:\Calendar"Remove a user’s permissions from another users calendar.
Remove-MailboxFolderPermission -Identity "USERS_EMAIL_HERE:\Calendar" -User EDITORS_EMAIL_HERE